package com.dingreading.cloud.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 员工代金券使用记录
 */
@Data
@Table(value = "coupon_staff_log")
public class CouponStaffLog implements Serializable {

    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 添加时间
     */
    @ApiModelProperty(value = "添加时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()")
    private Date addTime;

    /**
     * 门店uid
     */
    @ApiModelProperty(value = "门店uid")
    private String storeUid;

    /**
     * 员工uid
     */
    @ApiModelProperty(value = "员工uid")
    private String staffUid;

    /**
     * 员工名
     */
    @ApiModelProperty(value = "员工名")
    private String fullName;

    /**
     * 门店名
     */
    @ApiModelProperty(value = "门店名")
    private String storeName;

    /**
     * 订单流水号
     */
    @ApiModelProperty(value = "订单流水号")
    private String code;

    /**
     * 代金券id
     */
    @ApiModelProperty(value = "代金券id")
    private Long couponId;

    /**
     * 代金券名
     */
    @ApiModelProperty(value = "代金券名")
    private String couponName;

    /**
     * 员工代金券id
     */
    @ApiModelProperty(value = "员工代金券id")
    private Long couponStaffId;

    /**
     * 代金券金额
     */
    @ApiModelProperty(value = "代金券金额")
    private Double couponMoney;

    /**
     * 使用前的金额
     */
    @ApiModelProperty(value = "使用前的金额")
    private Double beforeUseMoney;

    /**
     * 本次使用的金额
     */
    @ApiModelProperty(value = "本次使用的金额")
    private Double useMoney;

    /**
     * 剩余可用金额
     */
    @ApiModelProperty(value = "剩余可用金额")
    private Double usableMoney;

    /**
     * 状态 1.正常 -1.撤回
     */
    @ApiModelProperty(value = "状态")
    private Integer status;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Date editTime;

}
